﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QiCheXiaoShouYongHu1
{
    public partial class QICheXiangQing : Form
    {
        string name;
     
        public QICheXiangQing()
        {
            InitializeComponent();
        }
        public QICheXiangQing(string name1)
        {
            InitializeComponent();
            name = name1;
           
        }

        private void QICheXiangQing_Load(object sender, EventArgs e)
        {
            string sql = string.Format("select * from Car where QiCheMing='{0}'", name);
            DataTable table = DBHelper.Read(sql);
            string zx = table.Rows[0]["lujin"].ToString();
            string tp=table .Rows [0]["Tupian"].ToString() ;
            this.label1.Text = table.Rows[0]["QiCheMing"].ToString();
            this.label10.Text = table.Rows[0]["YonHuPinFen"].ToString();
            this.label11.Text = table.Rows[0]["JiBie"].ToString();
            this.label20.Text = table.Rows[0]["CheShengJieGo"].ToString();
            this.label12.Text = table.Rows[0]["FaDonJi"].ToString();
            this.label21.Text = table.Rows[0]["BianShuXiang"].ToString();
            this.label23.Text = table.Rows[0]["ZhiDaoJiaGe"].ToString();
            this.pictureBox1.Image = Image.FromFile(zx);
            this.pictureBox2.Image = Image.FromFile(tp);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string id = label1.Text;
            HouQuDiJia from = new HouQuDiJia( id);
            from.Show();
        }

      
    }
}
